/**
 * gpms
 * 2012-8-1 下午2:56:17
 * 作者：陈志明
 * 
 */
package com.gpms.privilege.service;

import java.util.List;

import com.gpms.common.service.BaseService;
import com.gpms.mapper.Role;
import com.gpms.privilege.dao.*;

/**
 * @author Jackie chen
 *
 */
public class RoleService extends BaseService {
	private RoleDao roleDao;
	
	public List<Role> getAllRole(){
		return roleDao.findAllRole();
	}
	
	public Role getRoleById(Role role){
		return roleDao.findRoleById(role);
	}
	
	public int addRole(Role role){
		return roleDao.saveRole(role);
	}
	
	public int updateRoleById(Role role){
		return roleDao.alterRoleById(role);
	}
	
	public int deleteRoleById(Role role){
		return roleDao.removeRoleById(role);
	}
	
	/**
	 * @param roleDao the roleDao to set
	 */
	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}
}
